<%@ page contentType="text/html; charset=UTF-8" %>
<form name="menuFrm" method="POST">
    <input type="hidden" name="title" value="">
    <input type="hidden" name="writer_id" value="">
    <input type="hidden" name="writer_nick_name" value="">
    <input type="hidden" name="content" value="">
    <input type="hidden" name="search_title" value="">
    <input type="hidden" name="search_writer" value="">
    <input type="hidden" name="search_nickName" value="">
    <input type="hidden" name="search_content" value="">
    <input type="hidden" name="browserType" value="">
    <input type="hidden" name="nextTarget" value="">


    <div id="top">
        <div id="top_menu">
            <!-- 세션 검사 및 로그인 / 비로그인 팝업 -->
            <%
                HttpSession s = request.getSession(false); // HttpSession 이 존재하면 세션을 반환 없으면 null 값 반환

                if(null == s.getAttribute("userId")){
            %>

            <!-- HttpSession 이 존재하지 않을 경우 -->
            <ul id="navi">
                <li id="notice"><a href="javascript:jsNoticeBoardList()"><spring:message code="header.notice" /></a></li>
                <li id="faq"><a href="javascript:jsFAQ()"><spring:message code="header.faq" /></a></li>
                <li id="board"><a href="javascript:jsCommunityBoardList()"><spring:message code="header.board" /></a></li>
                <li id="gallery"><a href="javascript:jsPhotoBoardList()"><spring:message code="header.gallery" /></a></li>
                <li id="contactus"><a href="javascript:jsContactUs()"><spring:message code="header.contactus" /></a></li>
                <li id="login"><a href="index.do"><spring:message code="header.login" /></a></li>
            </ul>

            <% }else if(s.getAttribute("level").equals("1")){%>
            <!-- level 1 : 관리자 일 경우 -->

            <!-- HttpSession 이 존재할 경우 : userId, userName-->
            <div id="user_info">
                <strong><%=s.getAttribute("userId")%> <spring:message code="header.user_info" />
                    <a href="myPage.do"><img src="/images/intro/btn_mypage.gif" /></a>
                    <a href="updateMember.do"><img src="/images/intro/btn_info.gif" /></a>
                    <a href="admin.do"><img src="/images/intro/btn_admin.gif" /></a>
                    &nbsp;&nbsp;
                    <select name="select2" size="1" id="select2" class="admin_select" onchange="jsChangeLocale(this.value);">
                        <option value="ko">한국어</option>
                        <option value="zh">중국어</option>
                        <option value="en">영어</option>
                    </select>
            </div>

            <ul id="navi02">
                <li id="notice3"><a href="javascript:jsNoticeBoardList()"><spring:message code="header.notice" /></a></li>
                <li id="faq3"><a href="javascript:jsFAQ()"><spring:message code="header.faq" /></a></li>
                <li id="board3"><a href="javascript:jsCommunityBoardList()"><spring:message code="header.board" /></a></li>
                <li id="gallery3"><a href="javascript:jsPhotoBoardList()"><spring:message code="header.gallery" /></a></li>
                <li id="contactus3"><a href="javascript:jsContactUs()"><spring:message code="header.contactus" /></a></li>
                <li id="logout3"><a href="logout.do"><spring:message code="header.navi.logout" /></a></li>
            </ul>

            <%
            }else{
            %>

            <!-- HttpSession 이 존재할 경우 : userId, userName-->
            <div id="user_info">
                <strong><%=s.getAttribute("userId")%> <spring:message code="header.user_info" />
                    <a href="myPage.do"><img src="/images/intro/btn_mypage.gif" /></a>
                    <a href="updateMember.do"><img src="/images/intro/btn_info.gif" /></a>
            </div>

            <ul id="navi02">
                <li id="notice2"><a href="javascript:jsNoticeBoardList()"><spring:message code="header.notice" /></a></li>
                <li id="faq2"><a href="javascript:jsFAQ()"><spring:message code="header.faq" /></a></li>
                <li id="board2"><a href="javascript:jsCommunityBoardList()"><spring:message code="header.board" /></a></li>
                <li id="gallery2"><a href="javascript:jsPhotoBoardList()"><spring:message code="header.gallery" /></a></li>
                <li id="contactus2"><a href="javascript:jsContactUs()"><spring:message code="header.contactus" /></a></li>
                <li id="logout"><a href="logout.do"><spring:message code="header.navi.logout" /></a></li>
            </ul>
            <% } %>


        </div>
        <a href="intro.do"><img src="/images/intro/logo.gif" /></a>
    </div>
</form>


